import java.util.Scanner;

public class ComputeGratuityAndTotal {
    public static void main(String[] args) {
        Scanner input = new Scanner(System.in);
        System.out.print("请输入消费金额和小费百分比（如 10 15）：");
        double subtotal = input.nextDouble();
        double gratuityRate = input.nextDouble();
        double gratuity = subtotal * gratuityRate / 100;
        double total = subtotal + gratuity;
        System.out.printf("小费为 $%.1f，总额为 $%.1f%n", gratuity, total);
        input.close();
    }
}